import { createStore } from 'vuex'
// vue2.0 nwe Vuex.Store({})
import createPersistedstate from 'vuex-persistedstate'
import cart from '@/store/modules/cart.js'
import user from '@/store/modules//user.js'
import category from './modules/category'
export default createStore({
  modules: {
    cart,
    user,
    category
  },
  plugins: [createPersistedstate({
    // 默认存储在localstore
    key: 'erabbit-client-pc-store',
    paths: ['user', 'cart']
  })
  ]
})
